home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP Eylül 1998.iso / Slackwar / docs / mini / Install-From-ZIP < prev    next >
Text File  |  1997-02-12  |  14KB  |  381 lines

  1.   Linux Install From PP-Zip drive mini-HOWTO
  2.   by Kevin Snively, k.snively@seaslug.org
  3.   v01.02, 27 January 1998
  4.  
  5.   This document describes how to install Linux from a parallel port zip
  6.   drive.
  7.  
  8.   1.  Prelude
  9.  
  10.   1.1.  Intro:
  11.  
  12.   The following method written for use with the Slackware Distribution
  13.   and assumes some familiarity with doing a Slackware install, and that
  14.   the installer will have access to a working Linux system of any
  15.   distribution.  It also assumes the destination system has 4 to 6 megs
  16.   ram.  More powerful systems can use this method also but you will
  17.   probably be able to find a faster easier way.  It is not intended to
  18.   be used by first time installers or to replace Slackware documentation
  19.   or other Linux HOWTO's. Only issues specific to the use of a zip drive
  20.   as source media will be covered here.
  21.  
  22.   1.2.  Background:
  23.  
  24.   I have an OLD 486/20 slc with a 120 meg hd, 4 megs ram and a 2400 baud
  25.   modem that I wanted to run Linux on. It has no cdrom drive or pcmcia
  26.   connectivity, and will never see a network card (parallel port style).
  27.   There is nothing left that can be upgraded on this unit.
  28.  
  29.   Linux has been at the cutting edge from the start but also breathes
  30.   new life into some older 386 and 486 hardware.  The documentation says
  31.   "386 with 2 megs ram no math coprocesser" but try to find a
  32.   distribution that will do it today.  Slackware can be placed on a 4
  33.   meg machine with some work and a prayer. The following system greatly
  34.   reduces the work.  Prayer always helps, even with the best of systems.
  35.  
  36.   I've  used the following system with 3 other laptops, and one 386
  37.   desktop machine. The lamest being a 386 with 4 megs ram & 60 meg HD no
  38.   math coprocesser.  While this system works well I'd like to be able to
  39.   do similar tricks with Debian, RedHat, SuSe, Caldera Lite, and some of
  40.   the other popular distributions offering more choice to linux users I
  41.   help this way.
  42.  
  43.   1.3.  Advantages:
  44.  
  45.   Installing from cdrom or Ethernet are the methods of choice when
  46.   available.  In cases where floppy disk install appears to be the only
  47.   choice a parallel port zip drive offers numerous advantages.  These
  48.   include better speed than a floppy, and fewer disk changes. In
  49.   addition on systems with minimal ram "6 megs. or less" the ability to
  50.   install a swap file on the root disk and to use the color.gz root disk
  51.   or text.gz.  On systems with only 4 megs. ram color.gz does not work
  52.   for floppy based install.  With a zip disk install it does. It also
  53.   allows for the production of a emergency boot disk on low memory
  54.   systems during initial install, something not possible on low memory
  55.   systems during a normal floppy based install.
  56.  
  57.   1.4.  Material:
  58.  
  59.   This method has been used with Slackware Ver. 3.1, 3.2 and 3.3.  A
  60.   full install requires 2 zip disk's, one parallel port zip drive &
  61.   cables, a 1.44 meg boot disk, pencil and paper for making a few notes
  62.   during install.
  63.  
  64.   At least two systems are required to use this install method. The
  65.   first (host) system is used to prepare the installation media and must
  66.   contain a working linux system. The second will be the target system.
  67.   Once the media has been prepared it can be used to install to as many
  68.   target systems as you like.  I work from cdrom but you can down load
  69.   the disk images from the Internet if you have a fast enough
  70.   connection.  For me this is not practical.
  71.  
  72.   1.5.  Conventions:
  73.  
  74.        let (floppy)    represent the path to and directory you
  75.                        mount your 1.44 meg floppy disk on.
  76.  
  77.        let    (zip)    represent the path to and directory you
  78.                        mount your zip disk on.
  79.  
  80.        let  (cdrom)    represent the path to and directory you
  81.                        mount your cdrom on.
  82.  
  83.        let (verx.x)    represent the distribution version you
  84.                        are installing.
  85.  
  86.   If you down load your disk images please let (cdrom)/slakware
  87.   represent the path and directory to those images.  My parallel port
  88.   zip drive shows up on my system as
  89.  
  90.                /dev/sda4
  91.  
  92.   I've never seen it come up as any thing else unless I run fdisk on it
  93.   and then I always get corrupt disk error messages when I try to use
  94.   the disk.  You also need to know the device names of your cdrom and
  95.   1.44 meg floppy drives. Mine are
  96.  
  97.               /dev/hdc     cdrom
  98.               /dev/fd0     1.44 meg floppy
  99.  
  100.   I'll use my device names, you use yours ;-|)
  101.  
  102.   About Slackware and slakware (note the missing c in slakware).
  103.   Slackware is the name of the overall distribution and slakware is the
  104.   name of the directory where Patrick Volkerding places the stable "not
  105.   experimental or developmental" packages for installation. Whenever I'm
  106.   writing about slakware I'm writing about the directory.
  107.  
  108.   1.6.  Other reading:
  109.  
  110.   Linux Installation & Getting Started by Matt Welsh
  111.  
  112.   If you are having trouble accessing your zip drive please see the
  113.   Linux ZIP drive mini-HOWTO By Grant Guenther
  114.  
  115.   I also recommend the LOWMEM.TXT document from the Slackware
  116.   documentation on your cdrom or Slackware ftp sight.
  117.  
  118.   2.  Technique:
  119.  
  120.   2.1.  Making the first zip disk.
  121.  
  122.   1)    Attach zip drive to host system, insert blank zip disk into the
  123.   drive and boot the system to Linux
  124.  
  125.   2)    Login.  You probably need to login as root or the user you log
  126.   in as will need to be able to write file systems, mount and unmount
  127.   disks etc....
  128.  
  129.   3)    Install an ext2fs file system on the zip disk.  with the
  130.   command:
  131.  
  132.                 /sbin/mke2fs -b 1024 /dev/sda4
  133.  
  134.   4)    Mount the zip disk with:
  135.  
  136.                 mount /dev/sda4 /(zip)
  137.  
  138.   5)    Insert your cdrom into its drive and mount it:
  139.  
  140.                 mount /dev/hdc /(cdrom)
  141.  
  142.   6)    Make a directory to install the slakware disk images in:
  143.  
  144.                 mkdir /(zip)/slakware
  145.  
  146.   7)    Make a writable (non cdrom, non zip disk) temporary directory on
  147.   your main disk to work in. May I suggest:
  148.  
  149.                 mkdir /root/slakware/(verx.x)
  150.  
  151.   8)    Copy the root disk image to the above named directory:
  152.  
  153.                 cp /(cdrom)/rootdsks/text.gz /root/slakware/(verx.x)/
  154.  
  155.   9)    Change directories to the one the root disk image was copied to
  156.   and decompress it with the commands:
  157.  
  158.                 cd /root/slakware/(verx.x)
  159.                 gunzip text.gz
  160.  
  161.   10)   Install a 1.44 meg floppy with a dos or ext2fs file system on it
  162.   in its drive and copy the root disk image to it this time with the dd
  163.   command:
  164.  
  165.                 dd if=text of=/dev/fd0
  166.  
  167.   11)   Mount the 1.44 meg floppy with the command:
  168.  
  169.                 mount /dev/fd0 /(floppy)
  170.  
  171.   12)   Copy the root disk image to the zip disk:
  172.  
  173.                 cp -dpR /(floppy)/* /(zip)/
  174.  
  175.   13)   In order to ease the install process later we will want to cre¡
  176.   ate a swap file on the zip disk of about 8 megs. with:
  177.  
  178.                 dd if=/dev/zero of=/(zip)/swap bs=1024 count=8208
  179.  
  180.   14)    Initialize the swap file with:
  181.  
  182.                 /sbin/mkswap /(zip)/swap 8208
  183.  
  184.   15)    Next with your favorite text editor you will need to edit the
  185.   file    /(zip)/etc/rc    and after the line /bin/mount -av -t nonfs
  186.   insert a new line
  187.  
  188.                 /sbin/swapon /swap
  189.  
  190.   16)   Copy the disk images to the zip disk:
  191.  
  192.                 cp -r /(cdrom)/slakware/[a-ty]* /(zip)/slakware/ &
  193.  
  194.   include the square brackets a-ty* exactly as shown above. the & sign
  195.   at the end of the line will make this command execute in the back¡
  196.   ground.  It takes about 20 min to complete. Use this time for some
  197.   coffee and reading more HOWTO's.
  198.  
  199.   17)  External zip drives have two lights--mine are green and yellow;
  200.   the internal drives appear to have only one. When my zip disk has
  201.   finished receiving information the yellow light goes out and I'm left
  202.   with just the green power light. on internal drives the single
  203.   "status?" light will go out.
  204.  
  205.   It is now time to prepare the floppy and zip disks for removal from
  206.   their drives by unmounting them:
  207.  
  208.                 cd
  209.                 umount /dev/fd0
  210.                 umount /dev/sda4
  211.  
  212.   18)  Slackware will grouse later if you don't check the filesystem on
  213.   the zip disk now. Use the command
  214.  
  215.                 /sbin/e2fsck -f /dev/sda4
  216.  
  217.   If there are no errors found when the command prompt returns it is
  218.   safe to press the eject buttons on the zip and 1.44 meg. floppy drives
  219.   and eject the disks. Don't forget to label them for what they are with
  220.   version numbers. I can't tell you how much easier this will make your
  221.   life in the long run.
  222.  
  223.   2.2.  Making the second zip disk.
  224.  
  225.   If the X window system is to be installed or you will be needing one
  226.   of the other prebuilt kernels it is now time to build the 2nd. zip
  227.   disk.
  228.  
  229.   x1)  Insert disk 2 in the zip drive. I like to write an ext2fs file
  230.   system on this disk also, but if it has a M$ Dos file system that will
  231.   work also. I use the up arrow key on my keyboard to recall previously
  232.   used commands from my history file because I'm a bit lazy, but if you
  233.   want to retype the command repeat instructions 3), 4), and 6) above.
  234.  
  235.   x2)  Copy the X11R6 "X Window" packages to zip
  236.  
  237.                 cp -r /(cdrom)/slakware/x* /(zip)/slakware/ &
  238.  
  239.   again in the background. This will take about 1/2 as long as step 9)
  240.   did.  If your system was slow then it will be again. More coffee and
  241.   HOWTO reading.
  242.  
  243.   x3)  There is also room on this disk for the custom kernels directory.
  244.   It is classy to install one that meets the system's needs as closely
  245.   as possible to go with the one needed to access the zip drive.  Make
  246.   this kernel the system default. So now we will make a directory for
  247.   that and then copy the information to it:
  248.  
  249.                 mkdir /(zip)/kernels
  250.                 cp -r /(cdrom)/kernels/* /(zip)/kernels/ &
  251.  
  252.   This will take another 10 or 15 min. Dispose of the used coffee? Read
  253.   more Linux Documentation?
  254.  
  255.   x4)  When disk activity is at an end repeat unmount the disk and run
  256.   fsck on it:
  257.  
  258.                 umount /dev/sda4
  259.                 /sbin/e2fsck -f /dev/sda4
  260.  
  261.   x5)  When e2fsck is done with the disk and the command prompt returns
  262.   to the screen eject the disk and label it.
  263.  
  264.   2.3.  Making the boot floppy.
  265.  
  266.   b1)  I now make a 1.44 meg boot disk using the
  267.   (cdrom)/bootdsks.144/iomega.s image. Install a new 1.44 meg floppy in
  268.   the proper drive. The command to use to make the disk is:
  269.  
  270.            dd if=/(cdrom)/bootdsks.144/iomega.s of=/dev/fd0
  271.  
  272.   Once the disk has been written and the command prompt returns you may
  273.   if you wish shut down the host system remove the zip drive from the
  274.   host, and go trotting merrily off, installing linux out of your zip
  275.   drive from Redmond to Bills house.
  276.  
  277.   3.  The install:
  278.  
  279.   3.1.  Round 1.
  280.  
  281.   After connecting everything up to the target machine and putting the
  282.   zip disk in place I boot the boot disk and at the boot prompt pass the
  283.   parameters
  284.  
  285.              mount root=/dev/sda4 ramdisk=0
  286.  
  287.   to lilo.
  288.  
  289.   Carefully read the instructions on the screen, then login as root and
  290.   fdisk root and swap partitions on the target drive.  Reboot the
  291.   machine, again passing the above parameters to lilo.
  292.  
  293.   Carefully reread the instructions on the screen, then login as root.
  294.  
  295.   Even on machines with only 4 megs. of ram you will not need to create
  296.   a swap partition until prompted to do so in the setup program. We
  297.   already have swap running on the zip disk. Run the Slackware setup
  298.   program:
  299.  
  300.                  setup
  301.  
  302.   CAREFULLY read and follow the instructions the menus provide.  The
  303.   first thing setup will want to do is create and initialize your swap
  304.   partition on your hard drive this is ok despite the dire warnings and
  305.   will not affect the swap file on the zip drive.
  306.  
  307.   You do not want to allow /dev/sda4 to be automatically mounted and
  308.   when questions come up about this in the menus. Do not add it unless
  309.   this zip drive is dedicated to the target machine full time.
  310.  
  311.   When you get the menu that asks where the source of the installation
  312.   media is select item number 4. "Install from a premounted directory".
  313.   The next screen will ask for its name it is /slakware.
  314.  
  315.   I recommend installing only the "a" disk set at this time. It will
  316.   crash the install if the person selecting packages gets greedy and
  317.   fills the disk before lilo is written and the kernel is installed.
  318.   During basic install I install the kernel from the boot disk only.
  319.   There are relatively few choices to be made from here and the
  320.   Slackware documentation from the cdrom or your ftp sight will do you
  321.   much better than I can from here.
  322.  
  323.   Leave the zip drive and disk in place after the initial install is
  324.   complete.  Remove the floppy when prompted to do so and reboot.  If
  325.   all is right in the world Bill, er, your friend/customer will have a
  326.   working Linux system come up.
  327.  
  328.   3.2.  Round 2.
  329.  
  330.   After rebooting the system login as root amd mount the zip disk again:
  331.  
  332.                  mount /dev/sda4 /mnt
  333.  
  334.   Check available drive space:
  335.  
  336.                  df
  337.  
  338.   Run setup again from your new system:
  339.  
  340.                  setup
  341.  
  342.   Choose "s" SOURCE from the menu and press the enter key.  Select item
  343.   number 4. "Install from a premounted directory" and press the enter
  344.   key again.
  345.  
  346.   Enter the directory name. This time use:
  347.  
  348.                  /mnt/slakware
  349.  
  350.   Choose the packages you want or need. All are available except those
  351.   which start with "x". When you're finished installing packages from
  352.   this disk exit setup and run:
  353.  
  354.                  umount /dev/sda4
  355.  
  356.   You may now remove the disk and if X will be installed insert the 2nd
  357.   zip disk and work through setup again this time only packages begining
  358.   with X will be available. If you will be installing a custom kernel
  359.   from the prebuilt kernels you may also do this while the 2nd. zip disk
  360.   is installed.
  361.  
  362.   This mini-HOWTO brought to you by the letters G. N. and U. and the
  363.   Linux documentation project.
  364.   Special thanks to Dr. Randolph Bentson whose devotion to Linux
  365.   inspired me to give something back to the people who gave us the ONE
  366.   TRUE OPERATING SYSTEM.
  367.  
  368.            I hope this helps someone.
  369.  
  370.            Sincerely
  371.  
  372.            Kevin Snively
  373.            P.O. Box 1013
  374.            Everett Wa. 98206-1013
  375.            USA
  376.  
  377.   k.snively@seaslug.org
  378.  
  379.            root@aldrovanda
  380.  
  381.